from appium import webdriver
import time

desired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '5.1.1'
desired_caps['deviceName'] = '127.0.0.1:62001'
# desired_caps['appPackage'] ='com.youba.calculate'
# desired_caps['appActivity'] ='.MainActivity'
desired_caps['noReset'] = True
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)



# TouchAction(driver).press(el).release().perform()   按压图书
# time.sleep(2)

#TouchAction(driver).long_press(el,duration=1000).release().perform()长按操作图书

#TouchAction(driver).tap(el,count=2).release().perform()  点击控件

#TouchAction(driver).move_to(el).release().perform()
#TouchAction(driver).move_to(x=30,y=348).release().perform()  移动

#TouchAction(driver).wait(5000).release().perform()  暂停